<admintpl file="header" />
<style>
	*{margin:0; padding:0;}
	body{font-family: "Microsoft Yahei", "hiragino sans gb", Helvetica, Arial, Tahoma;}
	.shdo{position: fixed; left:0; top:0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 10; display: none;}
	.stan-box{padding:10px 20px; width: 400px; max-height: 500px; background: #fff; position: fixed; left:100px; top:100px; z-index: 11; display: none;}
	.simgBox{max-height: 440px; overflow: auto; text-align: center;}
	.simgBox img{}
	.stit{height: 30px;}
	.stit .yuan{font-size: 14px;}
	.stit .cuo{display: block; width: 20px; height: 20px; color: #fff; background: #007aff; line-height: 20px; text-align: center; position: absolute; right:0; top:0; cursor: pointer;}
	.sbot{height: 30px; }
	.sbot span{height: 26px; line-height: 26px; width: 50px; font-size: 12px; color: #fff;  background: #007aff;  float: right; text-align: center; border-radius: 2px;margin-top: 6px; cursor: pointer;}
	.tanimg{cursor:pointer;}
    .aBtnInput{display: inline-block; padding:0 2px; background: #f1f1f1; border:1px solid #a5a5a5; border-radius: 2px; }
    .aBtnInput:link,.aBtnInput:visited,.aBtnInput:hover,.aBtnInput:active{text-decoration: none;color: #333;}
</style>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('active/activelist')}">活动管理</a></li>
			<li><a href="{:U('active/activeadd')}">活动添加</a></li>
		</ul>
		<form method="post" class="js-ajax-form">
		<table class="table table-hover table-bordered" style="height:50px">
			<tr>
				<td>活动名称：
					<input type="text" name="subject" style="width: 200px;" value="{:I('request.subject')}" placeholder="请输入活动名称">
				</td>
				<td>状态: 
					<select name="status" id="">
						<option value="0" <php>if($status == 0) echo "selected"</php>>-全部-</option>
						<option value="1" <php>if($status == 1) echo "selected"</php>>启用</option>
						<option value="2" <php>if($status == 2) echo "selected"</php>>禁用</option>
					</select>
				</td>
			</tr>
			<tr>
				<td>时间:
					<input type="text" class="js-datetime" name="start_time" value="{:I('request.start_time')}" style="width: 120px;" autocomplete="off">&nbsp;&nbsp;至
					<input type="text" class="js-datetime" name="end_time" value="{:I('request.end_time')}" style="width: 120px;" autocomplete="off">
				</td>
			</tr>
			<tr>
				<td colspan='2'>
					<input type="submit" class="btn btn-primary" value="搜索" />
					<a class="btn btn-danger" href="{:U('active/activelist')}">清空</a>
				</td>
			</tr>
		</table>
			<div class="table-actions">
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('active/activeorders')}">排序</button>
				<button class="btn btn-success btn-small js-ajax-submit" type="submit" data-action="{:U('active/activetoggle',array('display'=>1))}" data-subcheck="true">启用</button>
				<button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('active/activetoggle',array('hide'=>1))}" data-subcheck="true">禁用</button>
			</div>
			<php> $status=array("1"=>"启用","2"=>"禁用"); </php>
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="16">排序</th>
						<th width="50">ID</th>
						<th>活动标题</th>
						<th>发布时间</th>
						<th width="100">状态</th>
						<th width="120">操作</th>
					</tr>
				</thead>
				<tbody>
				<php>if(!empty($existdata)):</php>
					<foreach name="ads" item="vo">
					<tr>
						<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.activeid}"></td>
						<td style='padding-left:10px;'><input name='listorders[{$vo.activeid}]' type='text' size='3' value='{$vo.series}' class='input input-order'></td>
						<td>{$vo.activeid}</td>
						<td>{$vo.subject}</td>
						<td><php> echo date("Y-m-d H:i:s",strtotime($vo['create_time']));</php></td>
						<td>{$status[$vo['status']]}</td>
						<td width="200px">
							<a href="{:U('active/activeedit',array('id'=>$vo['activeid']))}">{:L('EDIT')}</a> |
							<a href="{:U('Review/reviewlist',array('id'=>$vo['activeid'],'type'=>'1'))}">活动评论</a> |
							<a href="{:U('active/activedel',array('id'=>$vo['activeid']))}" class="js-ajax-delete">{:L('DELETE')}</a>
						</td>
					</tr>
					</foreach>
				<php>else:</php>
				<tr>
					<td style="text-align: center;" colspan="10">未搜索到相关数据</td>
				</tr>
				<php>endif;</php>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>